package zyz.framework.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import zyz.framework.dao.dml.DmlItem;
import zyz.framework.dao.query.QueryItem;

import java.util.List;
@Mapper
public interface BaseMapper {
    public Integer insert(@Param("dmlItem") DmlItem dmlItem);

    public Integer insertByPk(@Param("dmlItem") DmlItem dmlItem);

    public Integer update(@Param("dmlItem") DmlItem dmlItem);

    public Integer delete(@Param("dmlItem") DmlItem dmlItem);

    public Integer getListCount(@Param("queryItem") QueryItem queryItem);

    public <T> T getOne(@Param("queryItem") QueryItem queryItem, @Param("getClazz") Class<T> clazz);

    public <T> List<T> getList(@Param("queryItem") QueryItem queryItem, @Param("getClazz") Class<T> clazz);
}